<%@page import="javax.print.DocFlavor.STRING"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../../common/prama.jsp" %>
<%
	List<HashMap<String, Object>> todoTypes = (List<HashMap<String, Object>>)request.getAttribute("todoTypes");
	List<HashMap<String, Object>> infoTypes = (List<HashMap<String, Object>>)request.getAttribute("infoTypes");
	HashMap<String, String> model = null;
	List<HashMap<String,String>> useList = null;
	String modelInfoType = "";
	String modelTodoType = "";
	if(request.getAttribute("model") != null ){
		model = (HashMap<String, String>)request.getAttribute("model");
		modelTodoType = model.get("TODO_TYPE");
	}
	if(request.getAttribute("useList") != null ){
		useList = (List<HashMap<String,String>>)request.getAttribute("useList");
	}
%>
<div >
	<form id="todoForm" >
		<div class="CommonPanel">
			<table>
				<tr>
					<td class="label">待办编码：</td>
					<td class="input"><input readonly="readonly" value="${todoCode }" name="todoCode"/></td>
					<td class="label">紧急程度：</td>
					<td class="input">
						<select name="todoLevel" style="width:105px">
							<option value="0">低</option>
							<option value="1">中</option>
							<option value="2">高</option>
						</select>
					</td>
				</tr>
				<tr>
					<td class="label">截止时间：</td>
					<td class="input"><input id="endTime" type="text" name="endTime"/></td>
					<td class="label">待办类型：</td>
					<td class="input" id="todo_type_td" colspan="3">
						<select name="todoType">
							<option value="">--请选择--</option>
							<%
								for(int i=0;i<todoTypes.size();i++){
									String id = todoTypes.get(i).get("ID")+"";
									String name = todoTypes.get(i).get("NAME")+"";
									String selected = id.equals(modelTodoType)? "checked":"";
								%>
								<option <%=selected %> value="<%=id %>" ><%=name %></option>
								<%
								}
							%>
						</select>
					</td>
				</tr>
				<tr>
					<td class="label">待办标题：</td>
					<td class="input" colspan="3">
						<input name="title" type="text" style="width:411px;"/>
					</td>
				</tr>
				<tr>
					<td class="label">待办内容：</td>
					<td class="input" colspan="3">
						<textarea name="content" style="width:411px;height:40px"></textarea>
					</td>
				</tr>
			</table>
		</div>
		<div class="CommonPanel">
			<table>
				<tr>
					<td class="label">目标地址：</td>
					<td class="input" colspan="3"><input style="width:170px" type="text" name="address" id="address"/></td>
					<td class="label">地图搜索：</td>
					<td  class="input" colspan="3"><input style="width: 120px;" type="text" id="localSearchAddr"/>&nbsp;<botton class="commonBtn" id="sBtn">搜索</botton></td>
				</tr>
			</table>
		</div>
		<div id="bmap" style="height: 270px;width: 557px;"></div>
		<button onclick="return false" style="display: none"></button>
		<div style="text-align: center;">
			<button class="commonBtn" id="sendOrderBtn" style="width: 200px;
height: 49px;
font-size: 25px;
margin-top: 5px;">发送待办</button>
		</div>
		<input type="hidden" name="x" />
		<input type="hidden" name="y" />
		<input type="hidden" name="userids" id="todo_userid"/>
		<input type="hidden" name="baiduUserids" id="baiduUserids"/>
		<input type="hidden" name="baiduChannelids" id="baiduChannelids"/>
		<input type="hidden" name="id" value="${id }"/>
	</form>
</div>